﻿@model TumbaloSoft.Models.Comprobante
@{
    ViewBag.Title = "Registrar Cuota pagada por comprobante";
    if (ViewBag.permiso == 3 || ViewBag.permiso == 0)
    {

        Layout = "~/Views/Shared/_AdministradorGeneralLayout.cshtml";

    }

    if (ViewBag.permiso == 2)
    {

        Layout = "~/Views/Shared/_AdministradorEdificiosLayout.cshtml";

    }
    if (ViewBag.permiso == 1)
    {
        Layout = "~/Views/Shared/_PropietarioLayout.cshtml";    
    }
}

<script>
    // increase the default animation speed to exaggerate the effect
    //$.fx.speeds._default = 4000;
    $(function () {
        $("#dialog").dialog({
            autoOpen: false,
            resizable: false,
            height: 240,
            modal: true,
            buttons: {
                "Si": function () {
                    $("#form_1").submit();
                    $(this).dialog('close');

                },

                "No": function () {
                    $(this).dialog("close");
                }
            }
        });

        $("#open").click(function () {
            $("#dialog").dialog("open");
            return false;
        });


    });
</script>
<script>
    $(document).ready(function () {
        $(":file").css("background-color", "lightgray");
        $(":file").css("height", "25px");
        $(":file").css("margin-left", "-7px");
    });
</script>

<body id="page5">
    <!-- content -->
    <div class="body2">
        <div class="main">
            <section id="content">
                <div class="wrapper">
                    <!--ESTA COLUMNA ES PARA EL MENU DE NAVEGACION DE LA IZQUIERDA QUE HABIA EN LOS MOCKUPS
                            DISCULPEN SI LOS ESTILOS ESTAN MAL NO SE MUCHO CSS-->
                    
                    <article class="col1" style="width: 500px">
                        <!--dentro de div pad2 trabajare mi formulario -->

                        <form id="form_1" method="post" style="height: 100%" enctype="multipart/form-data">
                            <div class="pad1">
                                <h3>Registrar Nuevo Comprobante </h3>
                                @Html.HiddenFor(model => model.prDepartamento.prAreaTotal)
                                @Html.HiddenFor(model => model.prDepartamento.prDireccion)
                                @Html.HiddenFor(model => model.prDepartamento.prValorMercado)
                                <div class="row">
                                    @if ((ViewBag.error = TempData["error"])!=null)
                                    {
                                        <h2 style="font-size: 27px">@ViewBag.error</h2>
                                    }
                                    <table style="width: 420px">
                                        <tr>
                                            <td style="width: 210px">
                                                <span>Numero de Comprobante</span>
                                            <td style="width: 210px">
                                                @Html.TextBoxFor(model => model.prIdComprobante, new { maxlength = "8" , style = "width:200px"})</td>
                                            @Html.ValidationMessageFor(model => model.prIdComprobante, null, new { style = "float: none" })

                                        </tr>
                                    </table>
                                </div>
                                <div class="row">
                                    <table style="width: 420px">
                                        <tr>
                                            <td style="width: 210px">
                                                <span>Fecha de Pago</span>
                                            <td style="width: 210px">
                                                <input class="input" type="date" name="prFechaEmisionComprobante" />
                                            @Html.ValidationMessageFor(model => model.prFechaEmisionComprobante, null)
                                        </tr>
                                    </table>
                                </div>
                                <!--Imagen-->
                                <div class="row">
                                    <table style="width: 420px">
                                        <tr>
                                            <td style="width: 210px">
                                                <span>Imagen: </span>
                                                <td style="width: 210px">
                                            @Html.TextBoxFor(model => model.prImagen, new { @class = "input", type = "file", maxlength = "255", placeholder = "Ingresa una imagen aqui" })
                                        </tr>
                                    </table>
                                </div>
                                <div class="row">
                                    <table style="width: 420px">
                                        <tr>
                                            <td style="width: 210px">
                                                <span>Cuota</span>
                                            <td style="width: 210px">
                                            @Html.TextBoxFor(model => model.prIdCuota, new { @class = "input", disabled = "true" })
                                            @Html.ValidationMessageFor(model => model.prIdCuota, null, new { style = "float: none" })
                                        </tr>
                                    </table>
                                </div>

                                <div class="row_select">
                                    <table style="width: 420px">
                                        <tr>
                                            <td style="width: 210px">
                                                <span>Departamento</span>
                                            <td style="width: 210px">
                                            @Html.TextBoxFor(model => model.prDepartamento.prNumeroDepartamento, new { @class = "input", disabled = "true" })
                                            @Html.ValidationMessageFor(model => model.prDepartamento.prNumeroDepartamento, null, new { style = "float: none" })
                                        </tr>
                                    </table>
                                </div>

                                <div class="row_select">
                                    <table style="width: 420px">
                                        <tr>
                                            <td style="width: 210px">
                                                <span>Monto</span>
                                            <td style="width: 210px">
                                            @Html.TextBoxFor(model => model.prMonto, new { @class = "input", disabled = "true" })
                                            @Html.ValidationMessageFor(model => model.prMonto, null, new { style = "float: none" })
                                        </tr>
                                    </table>
                                </div>

                                <div class="row">
                                    <table style="width: 420px">
                                        <tr>
                                            <td style="width: 210px">
                                                <span>Fecha emision</span>
                                            <td style="width: 210px">
                                            @Html.TextBoxFor(model => model.prFechaEmision, new { @class = "input", disabled = "true" })
                                            @Html.ValidationMessageFor(model => model.prFechaEmision, null, new { style = "float: none" })
                                        </tr>
                                    </table>
                                </div>

                                <div class="row">
                                    <table style="width: 420px">
                                        <tr>
                                            <td style="width: 210px">
                                                <span>Fecha vencimiento</span>
                                            <td style="width: 210px">@Html.TextBoxFor(model => model.prFechaVencimiento, new { @class = "input", disabled = "true" })
                                            @Html.ValidationMessageFor(model => model.prFechaVencimiento, null, new { style = "float: none" })
                                        </tr>
                                    </table>
                                </div>
                                <table style="width: 500px">
                                    <tr>
                                        <td style="width: 167px">
                                            <div id="dialog" title="Nuevo Comprobante">
                                                <p>Esta seguro que desea registrar este comprobante?</p>
                                                <!--<a href="#" id="opener"  class="button" onClick="document.getElementById('form_1').submit()">Guardar</a>-->
                                            </div>

                                            <button id="open" class="button">Registrar</button>

                                        </td>
                                        <td style="width: 166px"><a href="#" class="button" onclick="document.getElementById('form_1').reset()">Limpiar</a></td>
                                        <td style="width: 167px"><a href="javascript:history.go(-1)" class="button" onclick="document.getElementById('form_1').cancel()">Cancelar</a></td>
                                    </tr>
                                </table>
                                <br>
                                <br>
                            </div>
                        </form>
                    </article>
                </div>

            </section>
        </div>
    </div>

    <!-- / content -->

    <script type="text/javascript"> Cufon.now(); </script>

</body>

